package xyz.robinbingo.dockerfirst.controller;

import cn.hutool.json.JSONUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.robinbingo.dockerfirst.repository.TestRepository;

/**
 * @author Robin
 * @date 2018/12/17 13:40
 **/
@RestController
public class TestController {

    @Autowired
    private TestRepository testRepository;

    @GetMapping
    public String test() {
        return JSONUtil.toJsonStr(testRepository.findAll());
    }
}
